{template common/header}
<!--{if empty($_G['gp_infloat'])}-->
<div id="pt" class="wp"><a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo; $navigation</div>
<div id="ct" class="wp cl w">
	<div class="mn mw">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][2][filename]">$_G[setting][navs][2][navname]</a></label>
		</div>
		<div class="bw pbm">
<!--{/if}-->

<form id="attachpayform" method="post" autocomplete="off" action="forum.php?mod=misc&action=attachpay{if !empty($_G['gp_infloat'])}&paysubmit=yes&infloat=yes" onsubmit="ajaxpost('attachpayform', 'return_$_G['gp_handlekey']', 'return_$_G['gp_handlekey']', 'onerror');return false;"{else}"{/if}>
<div class="f_c">
	<h3 class="flb">
		<em id="return_$_G['gp_handlekey']">{lang pay_attachment}</em>
		<span>
			<!--{if !empty($_G['gp_infloat'])}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_G['gp_handlekey']')" title="{lang close}">{lang close}</a><!--{/if}-->
		</span>
	</h3>	
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="referer" value="$_G['referer']" />
	<input type="hidden" name="aid" value="$aid" />
	<!--{if !empty($_G['gp_infloat'])}--><input type="hidden" name="handlekey" value="$_G['gp_handlekey']" /><!--{/if}-->
	<div class="c"><table class="list" cellspacing="0" cellpadding="0" style="width:300px">
		<tr>
			<td>{lang author}</td>
			<td><a href="home.php?mod=space&uid=$attach[uid]">$attach[author]</a></td>
		</tr>
		<tr>
			<td>{lang attachment}</td>
			<td><div style="overflow:hidden">$attach[filename] <!--{if $attach['description']}-->($attach[description])<!--{/if}--></div></td>
		</tr>
		<tr>
			<td>{lang price}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]})</td>
			<td>$attach[price] {$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_author_income}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]})</td>
			<td>$attach[netprice] {$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_balance}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]})</td>
			<td>$balance {$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][unit]}</td>
		</tr>
	</table>
	</div>
	<!--{if empty($_G['gp_infloat'])}--><div class="m_c"><!--{/if}-->
	<div class="o pns">
		<a class="z" href="forum.php?mod=attachment&aid=$aidencode">{lang download}</a>
		<button class="pn pnc" type="submit" name="paysubmit" value="true"><span>{lang submit}</span></button>
	</div>
	<!--{if empty($_G['gp_infloat'])}--></div><!--{/if}-->
</div>
</form>

<!--{if !empty($_G['gp_infloat'])}-->
<script type="text/javascript" reload="1">
function succeedhandle_$_G['gp_handlekey'](locationhref) {
	ajaxget('forum.php?mod=viewthread&tid=$attach[tid]&viewpid=$attach[pid]', 'post_$attach[pid]');
	hideWindow('$_G['gp_handlekey']');
	showCreditPrompt();
}
</script>
<!--{/if}-->

<!--{if empty($_G['gp_infloat'])}-->
	</div>
</div>
</div>
<!--{/if}-->
{template common/footer}